package edu.yngsxy.wkstudy.core.sys.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import edu.yngsxy.wkstudy.core.model.entity.WkBaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * <p>
 * 角色表
 * </p>
 *
 * @author group 2
 * @since 2025-09-09
 */
@Getter
@Setter
@ToString
@TableName("role")
@Accessors(chain = true)
@Schema(description = "角色表")
public class Role extends WkBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 角色ID
     */
    @TableField(value = "role_id")
    @Schema(title = "角色ID", description = "角色ID", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotNull(message = "角色ID不能为空")
    private Integer roleId;

    /**
     * 角色名（如学生、教师管理员）
     */
    @TableField("role_name")
    @Schema(title = "角色名（如学生、教师管理员）", description = "角色名（如学生、教师管理员）", requiredMode =Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "角色名（如学生、教师管理员）不能为空")
    @Size(max = 50, message = "角色名（如学生、教师管理员）长度不能超过50个字符")
    private String roleName;

    /**
     * 角色描述
     */
    @TableField("description")
    @Schema(title = "角色描述", description = "角色描述", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 65535, message = "角色描述长度不能超过65,535个字符")
    private String description;
}
